/*
 *  BOEntity.h
 *  EidoTron
 *
 *  Created by Luca Di Franco on 09/03/11.
 *  Copyright 2011 Luca Di Franco. All rights reserved.
 *
 */

#ifndef __BUFFER_OBJECT_ENTITY_H__
#define	__BUFFER_OBJECT_ENTITY_H__

#include <map>
#include <vector>

#include "Entity.h"
#include "Vertex.h"

class Material;

using std::map;
using std::vector;

class BOEntity : public Entity
{
	
protected:
	vector< Material* >						materials;
	
	map< Material*, vector< Vertex >* >		verticesMap;
	map< Material*, vector< Normal >* >		normalsMap;
	map< Material*, vector< TextCoord >* >	textCoordsMap;
	map< Material*, unsigned int >			verticesBuffersMap;
	map< Material*, unsigned int >			normalsBuffersMap;
	map< Material*, unsigned int >			textCoordsBufferMap;
	
public:
	BOEntity(const char* fileName);
	virtual ~BOEntity();
	
	void generateBufferObjects();
	void deleteBufferObjects();
	virtual void renderEntity();
	
	virtual float* minMaxVal();
	
};

#endif